demos.Labs = Ext.extend(Ext.Panel, {
	title: 'Labs',
	id: 'labs',
    fullscreen: true,
	layout:	{
		type: 'vbox',
	    pack: 'start',
	},
    cardSwitchAnimation: 'slide',
    iconCls: 'iconLab',
//    layout: 'fit',
//    centered: true,
    scroll: 'vertical',
    hpicount: 0,
//    floating: true,
//    modal: true,

    initComponent: function() {
/*        Ext.apply(this, {
                dockedItems: [
                { xtype: 'toolbar',
                dock: 'top',
                title: 'Patient',
                centered: true,
			items: [{
                        text: 'back',
                        ui: 'back',
                        handler: function() {
                            if (Ext.is.Phone) demos.Tabcontrol.tabBar.setVisible(true);
                            sink.Main.ui.setActiveItem(demos.Maincontrol, {type: 'slide', direction: 'right'});
                            sink.Main.ui.currentCard = demos.Maincontrol;
//                            demos.Tabcontrol.tabBar.setActiveItem('patients', {type: 'slide', direction: 'right'})
                        }
                    }, {
                        xtype: 'spacer'
                    }, {
                        text: 'save',
                        ui: 'confirm',		
                        handler: function() {
                            var patientbadge = demos.patientscard.tab;
                            badgeNumber = parseInt(patientbadge.badgeText);
                            nextNumber = isNaN(badgeNumber) ? '' : badgeNumber-1;
                            patientbadge.setBadge(nextNumber);
//  KR                            ROSpanel.btnCount = 0;;
//                            Ext.getCmp('const1').setBadge('');
//  KR                          if (ToolbarDemo.isPhone()) ToolbarDemo.views.viewport.tabBar.setVisible(true);
//  KR                          ToolbarDemo.views.viewport.remove(ToolbarDemo.views.viewport.getActiveItem());
//  KR                          ToolbarDemo.views.viewport.setActiveItem('patients', {type: 'slide', direction: 'right'})
                        }
                    }]
                }]
        }); */
        Ext.apply(this, {
        	items: [{
/*        		html: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><line x1="0" y1="500" x2="500" y2="0" stroke-width="2" stroke="black"/></svg>',
        	}, { */
        		xtype: 'spacer',
        		width: '10',
        		height: '10'
        	}, {
        		layout:	{
	        		type: 'hbox',
	        	    pack: 'center',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '150',
	        	},
	            items: [{
	                xtype: 'numberfield',
	                name: 'hgb',
	                label: 'HGB'
	            }]
        	}, {
        		layout:	{
	        		type: 'hbox',
	        	    pack: 'center',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '150',
	        	},
	            items: [{
	                xtype: 'numberfield',
	                name: 'wbc',
	                label: 'WBC'
	            }, {
	        		xtype: 'spacer',
	        	}, {
	                xtype: 'numberfield',
	                name: 'hct',
	                label: 'HCT'
	            }]
        	}, {
        		layout:	{
	        		type: 'hbox',
	        	    pack: 'center',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '150',
	        	},
	            items: [{
	                xtype: 'numberfield',
	                name: 'platelets',
	                label: Ext.is.Phone ? 'Plts' : 'Platelets'
	            }]
        	}, {
        		xtype: 'spacer',
        		width: '20',
        		height: '20'
        	}, {
	        	layout:	{
	        		type: 'hbox',
	        	    pack: 'center',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '150',
	        	},
	            items: [{
	                xtype: 'numberfield',
	                name: 'na',
	                label: 'Na'
	            }, {
	                xtype: 'numberfield',
	                name: 'cl',
	                label: 'Cl'
	            }, {
	                xtype: 'numberfield',
	                name: 'bun',
	                label: 'BUN'
	        	}, {
	        		xtype: 'spacer',
	            }]
        	}, {
	        	layout:	{
	        		type: 'hbox',
	        	    pack: 'end',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '150',
	        	},
	            items: [{
	        		xtype: 'spacer',
	        	}, {
	        		xtype: 'spacer',
	        	}, {
	        		xtype: 'spacer',
	        	}, {
	        		xtype: 'spacer',
	        	}, {
	                xtype: 'numberfield',
	                name: 'glucose',
	                label: Ext.is.Phone ? 'Glu' : 'Glucose'
	        	}, {
	        		xtype: 'spacer',
	            }]
        	}, {
	        	layout:	{
	        		type: 'hbox',
	        	    pack: 'center',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '150',
	        	},
	            items: [{
	                xtype: 'numberfield',
	                name: 'K',
	                label: 'K'
	            }, {
	                xtype: 'numberfield',
	                name: 'co2',
	                label: 'CO2'
	            }, {
	                xtype: 'numberfield',
	                name: 'cr',
	                label: 'Cr'
	        	}, {
	        		xtype: 'spacer',
	            }]
        	}, {
        		xtype: 'spacer',
        		width: '20',
        		height: '20'
        	}, {
	        	layout:	{
	        		type: 'hbox',
	        	    pack: 'center',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '160',
	        	},
	            items: [{
	                xtype: 'numberfield',
	                name: 'height',
	                label: Ext.is.Phone ? 'Hgt' : 'Height'
	            }, {
	                xtype: 'numberfield',
	                name: 'weight',
	                label: Ext.is.Phone ? 'Wgt' : 'Weight'
	            }, {
	                xtype: 'numberfield',
	                name: 'b_p',
	                label: 'B/P'
	            }, {
	                xtype: 'numberfield',
	                name: 'heartrate',
	                labelWidth: Ext.is.Phone ? '40' : '100',
	                label: Ext.is.Phone ? 'HR' : 'Heart Rate'
	            }]
        	}, {
        		xtype: 'spacer',
        		width: '5',
        		height: '5'
        	}, {
	        	layout:	{
	        		type: 'hbox',
	        	    pack: 'center',
	        	},
	        	defaults: {
	                labelAlign: 'left',
	                labelWidth: Ext.is.Phone ? '40' : '80',
	                width: Ext.is.Phone ? '80' : '150',
	        	},
	            items: [{
	                xtype: 'numberfield',
	                name: 'resprate',
	                labelWidth: Ext.is.Phone ? '40' : '100',
	                label: Ext.is.Phone ? 'RR' : 'Resp. Rate'
	            }, {
	                xtype: 'numberfield',
	                name: 'temp',
	                label: Ext.is.Phone ? 'Tmp' : 'Temp.'
	            }, {
	                xtype: 'numberfield',
	                name: 'o2sat',
	                label: Ext.is.Phone ? 'O2S' : 'O2 Sat.'
	            }, {
	                xtype: 'numberfield',
	                name: 'percenton',
	                label: Ext.is.Phone ? '%on' : '% on'
	            }]
        	}]
	    });
        demos.Labs.superclass.initComponent.apply(this, arguments);
    }
});

Ext.reg('labs', demos.Labs);
